#ifndef CLCOMNOTIFY_H
#define CLCOMNOTIFY_H

#include <QtCore/qglobal.h>
#include "CLComLibrarys_global.h"
//CLCOMLIBRARYS_EXPORT

#define CLCOMNOTIFY_MAXLEN_EXINFO	64

#define CLCOMNOTIFY_NOERROR 1

#define CLCOMNOTIFY_MAX_COUNT 20

#define CLCOMNOTIFY_JUST_NOTIFY 1

typedef struct CLCOMLIBRARYS_EXPORT _tagNotifyNode
{
    int			_notifytype;
    int			_notifyModule;
    int         _datalen;
    char		_descriptInfo[CLCOMNOTIFY_MAXLEN_EXINFO];

    void*       _pData;

    void Clone(const _tagNotifyNode& other);
    _tagNotifyNode& operator=(const _tagNotifyNode& other);
}NOTIFYNODE, *PNOTIFYNODE;

typedef void(*PNOTIRYCALLBACK)(PNOTIFYNODE);

typedef struct CLCOMLIBRARYS_EXPORT _tagNotifyInitInfo
{
    int				_msgType;
    PNOTIRYCALLBACK _pCallback;
}NOTIFYINFO, *PNOTIFYINFO;

class CLCOMLIBRARYS_EXPORT CLComNotify
{
public:
    static void InitMsgNotify(int nModule, NOTIFYINFO& initInfo);

    static CLComNotify* GetInstance(int nModule = 0);

public:
    virtual void AddNotifyInfo(const char* info, int datalen, int nType) = 0;
    virtual void AddNotifyInfo(const NOTIFYNODE& notify) = 0;
};
#endif // CLCOMNOTIFY_H
